home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpC_111_Data < prev    next >
Encoding:
Text File  |  1992-04-08  |  1.9 KB  |  102 lines

  1. /* %filename% -- application-specific data management */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /* This module contains data structures to access the data in your */
  5. /* document's file(s). The purpose is to isolate the details of the */
  6. /* data representation into this module and to provide accessor */
  7. /* functions for reading/writing logical pieces of the data. */
  8. /* For your application, you will probably rewrite most of this. */
  9. /* This module will not be regenerated by AppMaker unless you delete it. */
  10.  
  11. #include <Types.h>
  12. #include <Quickdraw.h>
  13. #include <Controls.h>
  14. #include <Events.h>
  15. #include <Lists.h>
  16. #include <Menus.h>
  17. #include <TextEdit.h>
  18. #include "Globals.h"
  19. #include "Miscellany.h"
  20. #include "%appname%Data.h"
  21.  
  22. %If lang = MPW%
  23.     #pragma segment %appname%Data 
  24.  
  25. %end if%
  26.  
  27. /* Define additional "private" data structures. */
  28. typedef struct {
  29.         short        data;
  30. } MoreStuff;
  31.  
  32. /*----------*/
  33. void    AddStuff    (YourStuff        *stuff)
  34. {
  35. #pragma unused (stuff) 
  36.   
  37. } /* AddStuff */
  38.  
  39. /*----------*/
  40. Boolean  GetStuff    (void)
  41. {
  42.     return (false);
  43. } /* GetStuff */
  44.  
  45. /*----------*/
  46. void    PutStuff    (void)
  47. {
  48. } /* PutStuff */
  49.  
  50. /*----------*/
  51. void    DeleteStuff    (void)
  52. {
  53. } /* DeleteStuff */
  54.  
  55. /*----------*/
  56. void    InitAppData        (void)
  57. {
  58. } /* InitAppData */
  59.  
  60. /*----------*/
  61. void    DisposeAppData    (void)
  62. {
  63. } /* DisposeAppData */
  64.  
  65. /*----------*/
  66. Boolean    OpenAppFile        (short        vRefNum,
  67.                          Str255        fName,
  68.                          short        *fRefNum)
  69. {
  70.     Boolean            okay;
  71.  
  72.     okay = CheckOS (FSOpen (fName, vRefNum, fRefNum));
  73.     return (okay);
  74. } /* OpenAppFile */
  75.  
  76. /*----------*/
  77. void    CloseAppFile    (short        fRefNum)
  78. {
  79.     Boolean            okay;
  80.  
  81.     if (fRefNum != 0) {        /* could be 0 if closing new document */
  82.         okay = CheckOS (FSClose (fRefNum));
  83.     }
  84. } /* CloseAppFile */
  85.  
  86. /*----------*/
  87. void    ReadAppFile     (short        fRefNum)
  88. {
  89. #pragma unused (fRefNum) 
  90.   
  91.     InitAppData ();
  92. } /* ReadAppFile */
  93.  
  94. /*----------*/
  95. void    WriteAppFile    (short        fRefNum)
  96. {
  97. #pragma unused (fRefNum) 
  98.   
  99. } /* WriteAppFile */
  100.  
  101. /* %appName%Data */
  102.